import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JLabel;

public class HBThread
  implements Runnable
{
  private boolean KKLI = false;
  private GUI SEVERE;
  private long connect;
  private long currentTimeMillis;

  public HBThread(GUI paramGUI)
  {
    this.SEVERE = paramGUI;
    disconnect();
  }

  public final void run()
  {
    while (this.KKLI)
    {
      if (SEVERE())
        KKLI();
      if (connect())
        currentTimeMillis();
      getInputStream(10000);
    }
  }

  private void KKLI()
  {
    try
    {
      URL localURL = new URL("http://www.mccheat.net/mccheat/heartbeat.php");
      HttpURLConnection localHttpURLConnection = (HttpURLConnection)localURL.openConnection();
      localHttpURLConnection.connect();
      localHttpURLConnection.getInputStream();
      localHttpURLConnection.disconnect();
      this.connect = System.currentTimeMillis();
      System.out.println("Sent..");
    }
    catch (IOException localIOException)
    {
      Logger.getLogger(HBThread.class.getName()).log(Level.SEVERE, null, localIOException);
    }
  }

  private boolean SEVERE()
  {
    return System.currentTimeMillis() - this.connect >= 300000L;
  }

  private boolean connect()
  {
    return System.currentTimeMillis() - this.currentTimeMillis >= 60000L;
  }

  private void currentTimeMillis()
  {
    try
    {
      URL localURL = new URL("http://www.mccheat.net/mccheat/users.php");
      BufferedReader localBufferedReader = new BufferedReader(new InputStreamReader(localURL.openStream()));
      String str = localBufferedReader.readLine().trim();
      this.SEVERE.I.setText(str);
      this.currentTimeMillis = System.currentTimeMillis();
    }
    catch (IOException localIOException)
    {
      Logger.getLogger(HBThread.class.getName()).log(Level.SEVERE, null, localIOException);
    }
  }

  private void disconnect()
  {
    this.KKLI = true;
    new Thread(this).start();
  }

  private static void getInputStream(int paramInt)
  {
    try
    {
      Thread.sleep(paramInt);
    }
    catch (InterruptedException localInterruptedException)
    {
    }
  }
}

/* Location:           C:\Users\Administrator\Desktop\MCCheat_1.9\
 * Qualified Name:     HBThread
 * JD-Core Version:    0.6.0
 */